package com.branches.imgs;

/**
 * @author wujian
 * @date 2024/5/22
 */
public class Animal {
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static void main(String[] args) {
        Dog dog = new Dog();
        System.out.println(dog instanceof  Animal);
    }
}

class Dog extends Animal {
    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
